﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// CRRouteInfo_D数据模型对象
    /// </summary>
    [Serializable]
    public partial class CRRouteInfo_DMod
    {
        /// <summary>
        /// 初始化CRRouteInfo_D数据模型对象
        /// </summary>
        public CRRouteInfo_DMod()
        {
            
        }
        /// <summary>
        /// 初始化CRRouteInfo_D数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="routeID">RouteID</param>
        /// <param name="serial">Serial</param>
        /// <param name="lTLongitude">LTLongitude</param>
        /// <param name="lTLatitude">LTLatitude</param>
        public CRRouteInfo_DMod(string routeID,int serial,decimal lTLongitude,decimal lTLatitude)
        {
            //给RouteID字段赋值
            this.RouteID = routeID;
            //给Serial字段赋值
            this.Serial = serial;
            //给LTLongitude字段赋值
            this.LTLongitude = lTLongitude;
            //给LTLatitude字段赋值
            this.LTLatitude = lTLatitude;
        }
        /// <summary>
        /// 初始化CRRouteInfo_D数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="routeID">RouteID</param>
        /// <param name="serial">Serial</param>
        /// <param name="lTLongitude">LTLongitude</param>
        /// <param name="lTLatitude">LTLatitude</param>
        /// <param name="longitude">Longitude</param>
        /// <param name="latitude">Latitude</param>
        /// <param name="lTLength">LTLength</param>
        /// <param name="length">Length</param>
        /// <param name="caption">Caption</param>
        public CRRouteInfo_DMod(string routeID,int serial,decimal lTLongitude,decimal lTLatitude,long? longitude,long? latitude,decimal? lTLength,decimal? length,string caption)
        {
            //给RouteID字段赋值
            this.RouteID = routeID;
            //给Serial字段赋值
            this.Serial = serial;
            //给LTLongitude字段赋值
            this.LTLongitude = lTLongitude;
            //给LTLatitude字段赋值
            this.LTLatitude = lTLatitude;
            //给Longitude字段赋值
            this.Longitude = longitude;
            //给Latitude字段赋值
            this.Latitude = latitude;
            //给LTLength字段赋值
            this.LTLength = lTLength;
            //给Length字段赋值
            this.Length = length;
            //给Caption字段赋值
            this.Caption = caption;
        }
        
		//属性存储数据的变量
        private string _routeID;
        private int _serial;
        private decimal _lTLongitude;
        private decimal _lTLatitude;
        private long? _longitude;
        private long? _latitude;
        private decimal? _lTLength;
        private decimal? _length;
        private string _caption;
        
        /// <summary>
        /// RouteID
        /// </summary>
        public string RouteID
        {
            get { return this._routeID; }
            set { this._routeID = value; }
        }
        /// <summary>
        /// Serial
        /// </summary>
        public int Serial
        {
            get { return this._serial; }
            set { this._serial = value; }
        }
        /// <summary>
        /// LTLongitude
        /// </summary>
        public decimal LTLongitude
        {
            get { return this._lTLongitude; }
            set { this._lTLongitude = value; }
        }
        /// <summary>
        /// LTLatitude
        /// </summary>
        public decimal LTLatitude
        {
            get { return this._lTLatitude; }
            set { this._lTLatitude = value; }
        }
        /// <summary>
        /// Longitude
        /// </summary>
        public long? Longitude
        {
            get { return this._longitude; }
            set { this._longitude = value; }
        }
        /// <summary>
        /// Latitude
        /// </summary>
        public long? Latitude
        {
            get { return this._latitude; }
            set { this._latitude = value; }
        }
        /// <summary>
        /// LTLength
        /// </summary>
        public decimal? LTLength
        {
            get { return this._lTLength; }
            set { this._lTLength = value; }
        }
        /// <summary>
        /// Length
        /// </summary>
        public decimal? Length
        {
            get { return this._length; }
            set { this._length = value; }
        }
        /// <summary>
        /// Caption
        /// </summary>
        public string Caption
        {
            get { return this._caption; }
            set { this._caption = value; }
        }
        
        /// <summary>
        /// 对比两个CRRouteInfo_D数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的CRRouteInfo_D数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成CRRouteInfo_D数据模型对象
            CRRouteInfo_DMod cRRouteInfo_DMod = obj as CRRouteInfo_DMod;
            //判断是否转换成功
            if (cRRouteInfo_DMod == null) return false;
            //进行匹配属性的值
            return
                //判断RouteID是否一致
                this.RouteID == cRRouteInfo_DMod.RouteID &&
                //判断Serial是否一致
                this.Serial == cRRouteInfo_DMod.Serial &&
                //判断LTLongitude是否一致
                this.LTLongitude == cRRouteInfo_DMod.LTLongitude &&
                //判断LTLatitude是否一致
                this.LTLatitude == cRRouteInfo_DMod.LTLatitude &&
                //判断Longitude是否一致
                this.Longitude == cRRouteInfo_DMod.Longitude &&
                //判断Latitude是否一致
                this.Latitude == cRRouteInfo_DMod.Latitude &&
                //判断LTLength是否一致
                this.LTLength == cRRouteInfo_DMod.LTLength &&
                //判断Length是否一致
                this.Length == cRRouteInfo_DMod.Length &&
                //判断Caption是否一致
                this.Caption == cRRouteInfo_DMod.Caption;
        }
        /// <summary>
        /// 将当前CRRouteInfo_D数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将CRRouteInfo_D数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将RouteID进行按位异或运算处理
                (this.RouteID == null ? 2147483647 : this.RouteID.GetHashCode()) ^
                //将Serial进行按位异或运算处理
                this.Serial.GetHashCode() ^
                //将LTLongitude进行按位异或运算处理
                this.LTLongitude.GetHashCode() ^
                //将LTLatitude进行按位异或运算处理
                this.LTLatitude.GetHashCode() ^
                //将Longitude进行按位异或运算处理
                (this.Longitude == null ? 2147483647 : this.Longitude.GetHashCode()) ^
                //将Latitude进行按位异或运算处理
                (this.Latitude == null ? 2147483647 : this.Latitude.GetHashCode()) ^
                //将LTLength进行按位异或运算处理
                (this.LTLength == null ? 2147483647 : this.LTLength.GetHashCode()) ^
                //将Length进行按位异或运算处理
                (this.Length == null ? 2147483647 : this.Length.GetHashCode()) ^
                //将Caption进行按位异或运算处理
                (this.Caption == null ? 2147483647 : this.Caption.GetHashCode());
        }
        /// <summary>
        /// 将当前CRRouteInfo_D数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前CRRouteInfo_D数据模型对象转换成字符串副本
            return
                "[" +
                //将RouteID转换成字符串
                this.RouteID + "," +
                //将Serial转换成字符串
                this.Serial + "," +
                //将LTLongitude转换成字符串
                this.LTLongitude + "," +
                //将LTLatitude转换成字符串
                this.LTLatitude +
                "]";
        }
    }
}
